<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * CakePHP PrgHelper
 * @author lucas
 */
class PrgHelper extends AppHelper {

    public $helpers = array();

    public function __construct(View $View, $settings = array()) {
        parent::__construct($View, $settings);
    }

    public function encode($str) {
        return str_replace(array('/', '='), array('-', '_'), base64_encode($str));
    }

    public function decode($str) {
        return base64_decode(str_replace(array('-', '_'), array('/', '='), $str));
    }

}
